package org.ehe.finance.payable.event;

import lombok.Getter;
import org.springframework.context.ApplicationEvent;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 付款完成事件
 * @author :zhangnn
 * @className :PaymentMadeEvent
 * @description: TODO
 * @date 2025-09-02 10:51:49
 */
@Getter
public class PaymentMadeEvent extends ApplicationEvent {
    private final Long payableId;
    private final String billNo;
    private final BigDecimal paymentAmount;
    private final BigDecimal remainingAmount;
    private final LocalDateTime eventTime;

    public PaymentMadeEvent(Object source, Long payableId, String billNo,
                            BigDecimal paymentAmount, BigDecimal remainingAmount) {
        super(source);
        this.payableId = payableId;
        this.billNo = billNo;
        this.paymentAmount = paymentAmount;
        this.remainingAmount = remainingAmount;
        this.eventTime = LocalDateTime.now();
    }
}
